import { defineStore } from 'pinia'
import { agencyAsync } from '@/appox/appox'

export const useProjectPanelStore = defineStore('project', () => {

  // 动作

  async function newProject() {
    await agencyAsync.runConsole('new-project.consoleworkflow')
  }

  async function openProject() {
    await agencyAsync.runConsole('open-project.consoleworkflow')
  }

  async function saveProject() {
    await agencyAsync.runConsole('save-project.consoleworkflow')
  }

  return {
    // 动作
    newProject,
    openProject,
    saveProject
  }
})